<template>
	<div>
		
	<div class="display_sw">
		<div class="home_left">
			<span class="shengxiao_span" v-for="(item,index) in result" :key="index">
           <!--  <img :src="require('../../../assets/images/caipiao/shengxiao'+result[index]+'.png')" alt="">-->
             {{result[index]}}
            </span>
		</div>
		<p class="home_you_fz">
			第<b class="color_red">{{result2}}</b> 期
		</p>
	</div>
		
	</div>
</template>

<script>
	export default {
		data() {
			return {
				result: [], //开奖期数6位
				result2: [], //开奖第几期
				created_at:"",//投注时间
			}
		},
		//   渲染之前请求  开奖号码
		created() {
			//   get请求  开奖期与开奖数
			this.http
				.get("/api/winning/number")
				.then(res => {

					if(res.status_code == 200) {
						this.result = res.data[0].winning_num.split(",");
						this.result2 = res.data[0].nper;
						this.created_at= res.data[0].created_at;
					} else {
						 this.$toast(res.data.message);
					}
				})
		},
	}
</script>

<style>
.home_left .shengxiao_span{border-radius: 50%;
    background-color: #d31d17;text-align: center;line-height: 0.6rem;color: #fff;}

</style>